import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.xssf.usermodel.*;

import java.io.*;
import java.util.List;

public class ReadExcel {
    public static void main(String[] args) {
        XSSFWorkbook xssfWorkbook  = null;
        try {
            xssfWorkbook = new XSSFWorkbook(new FileInputStream(new File("F:\\java\\test.xlsx")));
            XSSFSheet xssfSheet = xssfWorkbook.getSheetAt(0);
            xssfSheet.getRow(0).createCell(0).setCellValue("555");
            OutputStream outputStream = new FileOutputStream(new File("F:\\java\\test.xlsx"));
            xssfWorkbook.write(outputStream);
            outputStream.flush();
            outputStream.close();
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
